<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="format-detection" content="telephone=no" />
    <title>创建基本档</title>
    <link rel="stylesheet" type="text/css" href="./newstyle/css/loaders.min.css"/>
    <link rel="stylesheet" type="text/css" href="./newstyle/css/loading.css"/>
    <link rel="stylesheet" type="text/css" href="./newstyle/css/base.css"/>
    <link rel="stylesheet" type="text/css" href="./newstyle/css/style.css"/>
    <script src="./newstyle/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
    	$(window).load(function(){
    		$(".loading").addClass("loader-chanage")
    		$(".loading").fadeOut(300) 
    	})
    </script>
    <script type="text/javascript">
		window.onload=function(){
			idcardInfoShow();
			oldcardInfoShow();

		}
		//身份证号显示
		function idcardInfoShow(){
			//如果取到了刷卡信息,就显示在显示区,并设置提交按钮可用;如果没有提示手动输入证件信息.
			var idcardInfo=createArchivesTemp.cardInfo();
			//alert(idcardInfo);
			if(idcardInfo!=undefined){
				var str="<div style='background-color: #F7F7F7;width: 100%;height: 90px;'>"+
							"<div id='' style='padding-top: 10px;'>"+
								"请确认您的身份证号!"+
							"</div>"+
							"<div id='idCard' style='padding: 10px;'>"+
								idcardInfo+
							"</div>"+
							"</div>";
				document.getElementById("idcardInfo").innerHTML=str;
			}
		}
		//养老助残卡号显示
		function oldcardInfoShow(){
			//如果取到了刷卡信息,就显示在显示区,并设置提交按钮可用;如果没有提示手动输入证件信息.
			var oldcardInfo=createArchivesTemp.oldcardInfo();
			//alert(oldcardInfo);
			if(oldcardInfo!=undefined){
				var str="<div style='background-color: #F7F7F7;width: 100%;height: 90px;'>"+
							"<div id='' style='padding-top: 10px;'>"+
								"请确认您的养老助残卡号!"+
							"</div>"+
							"<div id='oldCard' style='padding: 10px;'>"+
								oldcardInfo+
							"</div>"+
							"</div>";
				document.getElementById("oldcardInfo").innerHTML=str;
			}
		}
		//手动录入身份证显示
		function idcardInfoShow2(info){
			var str="<div style='background-color: #F7F7F7;width: 100%;height: 90px;'>"+
							"<div id='' style='padding-top: 10px;'>"+
								"请确认您的身份证号!"+
							"</div>"+
							"<div id='idCard' style='padding: 10px;'>"+
								info+
							"</div>"+
							"</div>";
			document.getElementById("idcardInfo").innerHTML=str;
		}
		//手动录入养老助残卡显示
		function oldcardInfoShow2(info){
			var str="<div style='background-color: #F7F7F7;width: 100%;height: 90px;'>"+
							"<div id='' style='padding-top: 10px;'>"+
								"请确认您的身份证号!"+
							"</div>"+
							"<div id='oldCard' style='padding: 10px;'>"+
								info+
							"</div>"+
							"</div>";
			document.getElementById("oldcardInfo").innerHTML=str;
		}
		//跳转页面
		function toActivity(activityName){
			createArchivesTemp.toActivity(activityName);
		}
		//提交请求后台创建基本档接口
		function checkUp(){

            if($('#oldCard').length && $('#idCard').length){
            	var oldCard=document.getElementById("oldCard").innerText;
            	var idCard=document.getElementById("idCard").innerText;
            	var result=createArchivesTemp.allCreateBaseFile(oldCard,idCard);
            	alert(result);
            }else if($('#oldCard').length){
				var oldCard=document.getElementById("oldCard").innerText;
				var type=0;
				var result=createArchivesTemp.createBaseFile(oldCard,type);
            	alert(result);
            }else if($('#idCard').length){
				var idCard=document.getElementById("idCard").innerText;
				var type=1;
				var result=createArchivesTemp.createBaseFile(idCard,type);
            	alert(result);
            }

		}

	</script>
	<style type="text/css">
		.create{
			width: 100%;
			height: 100%;
			align-content: center;
			text-align: center;
		}
		.form{
			text-align: center;
			align-content: center;
			margin-top: 30px;
		}
		.table{
			width: 100%;
			height: auto;
		}
		.create input[type=button]{
			width: 75%;
			height: 60px;
			margin-right: 0px;
			font-size: 20px;
			background-color:#9999ff;
		} 
		a{color: #000;}
	</style>


		<!--loading页开始-->
	<div class="loading">
		<div class="loader">
	        <div class="loader-inner pacman">
	          <div></div>
	          <div></div>
	          <div></div>
	          <div></div>
	          <div></div>
	        </div>
		</div>
	</div>
	<!--loading页结束-->
</head>
<body>
	<header class="top-header fixed-header">
			<a class="icona" href="javascript:history.go(-1)">
					<!-- <img src="./newstyle/images/left.png"/> -->
			</a>
			<h3>创建基本档</h3>
			<a class="iconb" href="#">
			</a>
	</header>

	<div class="contaniner fixed-cont">
		<section class="to-buy">
			<header> 
				<div class="to-now"> 
					<div class="tonow"> 
					</div>
					
					<dl>
						<a href="javascript:void(0);"  onclick="toActivity('ManualInputOldcardActivity')">
						<dt>
							<b><img src="./newstyle/images/footer002.png" style='width: 18px;'/>&nbsp;手动输入老人卡信息</b>
						</dt> 
						<dd id="oldcardInfo"></dd>
						</a> 
					</dl>
					<h3><a href="javascript:void(0);"  onclick="toActivity('ManualInputOldcardActivity')"><img src="./newstyle/images/write.png"/></a></h3>
				</div> 
				<div class="to-now"> 
					<div class="tonow"> 
					</div>
					
					<dl> <a href="javascript:void(0);"  onclick="toActivity('ManualInputIdcardActivity')">
							<dt>
								<b><img src="./newstyle/images/footer002.png" style='width: 18px;'/>&nbsp;手动输入身份证信息</b> 
							</dt> 
							<dd  id="idcardInfo"></dd>
							</a>
					</dl>
					<h3><a href="javascript:void(0);"  onclick="toActivity('ManualInputIdcardActivity')"><img src="./newstyle/images/write.png"/></a></h3> 
					
				</div>
			</header>
 
		</section>
		<!--底部不够-->
		<div style="margin-bottom: 9%;"></div>
	</div> 

	<footer class="buy-footer fixed-footer">  
				<input type="button" id="sub" value="提交" onclick="checkUp()" />
	</footer>

</body>
</html>

 